﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Diagnostics;

namespace RTS
{
	class Barracks : TrainingUnitsBuilding
	{

		public Barracks(GameMain game)
			: base(game)
		{
			graphPositionOffset = new Position2D(10, -10);
			dispatchUnitsPositionOffset = new Position2D(-70, 100);
			collisionRadius = 100;
			maxLife = life = 100;

			optionsCreator = new TrainOptionsCreator(options);

			optionsCreator.AddTrainOption(typeof(LanceMan));
			optionsCreator.AddTrainOption(typeof(CrossBowMan));

			DefineTextures();
		}

		public override void update()
		{
			base.update();
		}

		private void DefineTextures()
		{
			trainingBuildingTextures = new RTSTrainingBuildingTexture(new TextureSize(310, 340));

			trainingBuildingTextures.Idle = "BarracksSpriteSheetIDLE";
			trainingBuildingTextures.Constructing = "BarracksSpriteSheetCONSTRUCTING";
			trainingBuildingTextures.Death = "BarracksSpriteSheetDEATH";
			trainingBuildingTextures.Spawning = "BarracksSpriteSheetSPAWNING";
			trainingBuildingTextures.GraphicInterface = "background for interface";
			trainingBuildingTextures.GraphicInterfaceExtended = "extended background for interface";
			trainingBuildingTextures.GraphicInterfaceOption = "button for interface";
			trainingBuildingTextures.SelectionArea = "Barracks_selection";
			trainingBuildingTextures.LifeBar = "Barracks_health bar life";
			trainingBuildingTextures.LifeBarBackground = "Barracks_health bar empty";
			trainingBuildingTextures.Seleted = "Barracks_selection circle";

			trainingBuildingTextures.AddTrainingUnit(typeof(LanceMan), "queue img for interface");
			trainingBuildingTextures.AddTrainingUnit(typeof(CrossBowMan), "queue img for interface");

			trainingBuildingTextures.LifeBarOffsetX = 80;
			trainingBuildingTextures.LifeBarWidth = 150;
		}

	}
}
